/*
 * @Description: 钱包提现账单界面
 * @Author: tao.xie
 * @Date: 2019-04-01 10:26:54
 * @Last Modified by: tao.xie
 * @Last Modified time: 2019-04-01 13:55:18
 */
<template>
  <route-bill-main
    :info-list="infoList"
    :detail-icon="detailIcon"
    :detail-msg="mallBill.title"
    :price="mallBill.orderPrice"
  />
</template>

<script>
import RouteBillMain from '../components/RouteBillMain'
import { getMallBill } from '../api/api.js'
import { getUrlParamByKey } from 'vue-xiaobu-utils'
export default {
  components: {
    'route-bill-main': RouteBillMain
  },
  data() {
    return {
      detailIcon: require('../assets/wallet.png'),
      infoList: [],
      mallBill: {}
    }
  },
  mounted() {
    this._getMallBill(getUrlParamByKey('tradeno'))
  },
  methods: {
    _getMallBill: async function (tradeno) {
      try {
        this.mallBill = await getMallBill(tradeno)
        let copyinfolist = []
        copyinfolist.push({
          infoName: '支付状态',
          infoValue: '提现成功'
        })
        if (this.mallBill.payName) {
          copyinfolist.push({
            infoName: '提现方式',
            infoValue: this.mallBill.payName + (this.mallBill.bankCardNo ? ' (' + this.mallBill.bankCardNo + ')' : '')
          })
        }

        copyinfolist.push({
          infoName: '提现时间',
          infoValue: this.mallBill.createTime
        })
        copyinfolist.push({
          infoName: '账单编号',
          infoValue: this.mallBill.orderNo
        })
        this.infoList = copyinfolist
      } catch (err) { }
    }
  }
}
</script>

<style>
</style>
